package com.gwd.task.repository;

import com.gwd.task.entity.CodeRepositoryRelateEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

/**
 * @author zhiyongming
 * @date 2020/12/22 14:30
 */
@Repository
public interface CodeRepositoryRelateRepository extends JpaRepository<CodeRepositoryRelateEntity, Long> {
    @Modifying
    @Transactional
    void deleteByCrId(Long crId);

    List<CodeRepositoryRelateEntity> findByCrId(Long crId);
    List<CodeRepositoryRelateEntity> findByProjectId(Long id);

}
